//package com.telit.firecommand.controller;
//
//import com.telit.common.annotation.Log;
//import com.telit.common.constant.Constant;
//import com.telit.common.entity.DataReturn;
//import com.telit.common.enums.BusinessOperatorType;
//import com.telit.common.enums.BusinessType;
//import com.telit.common.enums.OperatorType;
//import com.telit.common.enums.ServiceName;
//import com.telit.firecommand.dto.*;
//import com.telit.firecommand.model.saida.AddFireBySatelliteRequest;
//import com.telit.firecommand.model.saida.FireAlarmsUpdateStatusRequest;
//import com.telit.firecommand.service.FireAlarmsService;
//import com.telit.firecommand.vo.FireFeignAlarmsVO;
//import com.telit.firecommand.vo.FireQueryAllListVO;
//import com.telit.firecommand.vo.OperationVO;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiImplicitParam;
//import io.swagger.annotations.ApiOperation;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.http.MediaType;
//import org.springframework.web.bind.annotation.*;
//
//import java.util.List;
//
//
///**
// * 火情信息API
// */
//@Slf4j
//@RestController
//@RequestMapping(value = "/fire-alarms", produces = MediaType.APPLICATION_JSON_VALUE)
//@Api(tags = "火情操作流程相关接口", value = "火情操作流程相关接口", produces = MediaType.APPLICATION_JSON_VALUE)
//public class FireAlarmsController {
//
//    @Autowired
//    private FireAlarmsService fireAlarmsService;
//
//    //    @Log(service = ServiceName.FIRE_ALARMS, businessType = BusinessType.INSERT, operatorType = OperatorType.OTHER)
//    @ApiOperation(httpMethod = Constant.REQUEST_METHOD_POST, value = "火情上报值守专业")
//    @PostMapping(path = "/save")
//    public DataReturn save(@RequestBody CommFireAlarmDTO commFireAlarmDTO) {
//        String fireId = fireAlarmsService.save(commFireAlarmDTO);
//        return DataReturn.ok(fireId);
//    }
//
//
//    @Log(service = ServiceName.FIRE_ALARMS, businessType = BusinessType.INSERT, operatorType = OperatorType.OTHER)
//    @ApiOperation(httpMethod = Constant.REQUEST_METHOD_POST, value = "火情卫星上报")
//    @PostMapping(path = "/save-by-satellite")
//    public DataReturn<FireAlarmsDTO> saveBySatellite(@RequestBody AddFireBySatelliteRequest addFireBySatelliteRequest) {
//        return DataReturn.ok(fireAlarmsService.saveBySatellite(addFireBySatelliteRequest));
//    }
//
//
//    @Log(service = ServiceName.FIRE_ALARMS, businessType = BusinessType.BUSINESS_LOG, operatorType = OperatorType.WEB, businessOperatorType = BusinessOperatorType.JJBJ)
//    @ApiOperation(httpMethod = Constant.REQUEST_METHOD_POST, value = "火情接警")
//    @PostMapping(path = "/receiveFire")
//    public DataReturn receiveFire(@RequestBody FireAlarmsUpdateStatusDTO fireAlarmsUpdateStatusDTO) {
//        fireAlarmsService.updateStatus(fireAlarmsUpdateStatusDTO);
//        return DataReturn.ok();
//    }
//
//    @Log(service = ServiceName.FIRE_ALARMS, businessType = BusinessType.BUSINESS_LOG, operatorType = OperatorType.WEB, businessOperatorType = BusinessOperatorType.QRHQ)
//    @ApiOperation(httpMethod = Constant.REQUEST_METHOD_POST, value = "确认火情")
//    @PostMapping(path = "/confirmAlarm")
//    public DataReturn confirmAlarm(@RequestBody ConfirmAlarmDTO confirmAlarmDTO) {
//        fireAlarmsService.confirmAlarm(confirmAlarmDTO);
//        return DataReturn.ok();
//    }
//
//    @Log(service = ServiceName.FIRE_ALARMS, businessType = BusinessType.BUSINESS_LOG, operatorType = OperatorType.WEB, businessOperatorType = BusinessOperatorType.QRFHQ)
//    @ApiOperation(httpMethod = Constant.REQUEST_METHOD_POST, value = "确认非火情")
//    @PostMapping(path = "/unConfirmAlarm")
//    public DataReturn unConfirmAlarm(@RequestBody ConfirmAlarmDTO confirmAlarmDTO) {
//        fireAlarmsService.conUnfirmAlarm(confirmAlarmDTO);
//        return DataReturn.ok();
//    }
//
//    @ApiOperation(httpMethod = Constant.REQUEST_METHOD_GET, value = "重复火情列表")
//    @GetMapping(path = "/repeatAlarmsList")
//    public DataReturn repeatAlarmsList(@RequestParam(required = false) String fireId,
//                                       @RequestParam(required = true) String longitude,
//                                       @RequestParam(required = true) String latitude) {
//        List<FireQueryAllListVO> fireQueryAllListVOS = fireAlarmsService.repeatAlarmsList(fireId, longitude, latitude);
//        return DataReturn.ok(fireQueryAllListVOS);
//    }
//
//
//    @Log(service = ServiceName.FIRE_ALARMS, businessType = BusinessType.BUSINESS_LOG, operatorType = OperatorType.WEB, businessOperatorType = BusinessOperatorType.CFHQ)
//    @ApiOperation(httpMethod = Constant.REQUEST_METHOD_POST, value = "重复火情")
//    @PostMapping(path = "/alarmsRepeat")
//    public DataReturn alarmsRepeat(@RequestBody AlarmsRepeatDTO alarmsRepeatDTO) {
//        fireAlarmsService.alarmsRepeat(alarmsRepeatDTO);
//        return DataReturn.ok();
//    }
//
//    @Log(service = ServiceName.FIRE_ALARMS, businessType = BusinessType.BUSINESS_LOG, operatorType = OperatorType.WEB, businessOperatorType = BusinessOperatorType.HDJP)
//    @ApiOperation(httpMethod = Constant.REQUEST_METHOD_POST, value = "火情纠偏")
//    @PostMapping(path = "/firePosition")
//    public DataReturn firePosition(@RequestBody FirePositionDTO firePositionDTO) {
//        fireAlarmsService.firePosition(firePositionDTO);
//        return DataReturn.ok();
//    }
//
//
//    @Log(service = ServiceName.FIRE_ALARMS, businessType = BusinessType.BUSINESS_LOG, operatorType = OperatorType.WEB, businessOperatorType = BusinessOperatorType.WCCZ)
//    @ApiOperation(httpMethod = Constant.REQUEST_METHOD_POST, value = "完成处置")
//    @PostMapping(path = "/endHandle")
//    public DataReturn endHandle(@RequestBody FireAlarmsUpdateStatusDTO fireAlarmsUpdateStatusDTO) {
//        fireAlarmsService.updateStatus(fireAlarmsUpdateStatusDTO);
//        return DataReturn.ok();
//    }
//
//
//    @Log(service = ServiceName.FIRE_ALARMS, businessType = BusinessType.BUSINESS_LOG, operatorType = OperatorType.WEB, businessOperatorType = BusinessOperatorType.XQJY)
//    @ApiOperation(httpMethod = Constant.REQUEST_METHOD_POST, value = "指挥调度-启动响应")
//    @PostMapping(path = "/beginRescue")
//    public DataReturn beginRescue(@RequestBody AlarmsRescueDTO alarmsRescueDTO) {
//        fireAlarmsService.beginRescue(alarmsRescueDTO);
//        return DataReturn.ok();
//    }
//
//
//    @Log(service = ServiceName.FIRE_ALARMS, businessType = BusinessType.BUSINESS_LOG, operatorType = OperatorType.WEB, businessOperatorType = BusinessOperatorType.WCCZ)
//    @ApiOperation(httpMethod = Constant.REQUEST_METHOD_POST, value = "完成扑救")
//    @PostMapping(path = "/endRescue")
//    public DataReturn endRescue(@RequestBody AlarmsRescueDTO alarmsRescueDTO) {
//        fireAlarmsService.endRescue(alarmsRescueDTO);
//        return DataReturn.ok();
//    }
//
//    @Log(service = ServiceName.FIRE_ALARMS, businessType = BusinessType.BUSINESS_LOG, operatorType = OperatorType.WEB, businessOperatorType = BusinessOperatorType.ZHDD)
//    @ApiOperation(httpMethod = Constant.REQUEST_METHOD_POST, value = "进入指挥调度(无实际逻辑)")
//    @PostMapping(path = "/commandAndDispatch")
//    public DataReturn commandAndDispatch(@RequestBody CommandAndDispatchDTO commandAndDispatchDTO) {
//        return DataReturn.ok();
//    }
//
//
//    @ApiOperation(httpMethod = Constant.REQUEST_METHOD_GET, value = "点击读取火情")
//    @GetMapping(path = "/isReadFire")
//    @ApiImplicitParam(name = "isWatchman", value = "是否为值守员角色 0 否 1 是", required = true)
//    public DataReturn isReadFire(@RequestParam("fireId") String fireId,
//                                 @RequestParam("isWatchman") Integer isWatchman) {
//        fireAlarmsService.isReadFire(fireId, isWatchman);
//        return DataReturn.ok();
//    }
//
//
//    @ApiOperation("查询火情操作的记录")
//    @GetMapping(path = "/fireOperatorLog")
//    public DataReturn<List<OperationVO>> fireOperatorLog(@RequestParam("fireId") String fireId) {
//        List<OperationVO> result = fireAlarmsService.fireOperatorLog(fireId);
//        return DataReturn.ok(result);
//    }
//
//
//    @GetMapping(value = "/isRescue")
//    @ApiOperation("判断火情是否处于抢险救援中   true在抢险救援中 false表示不在")
//    public DataReturn<Boolean> isRescue(@RequestParam("fireId") String fireId) {
//        Boolean isRescue = fireAlarmsService.isRescue(fireId);
//        return DataReturn.ok(isRescue);
//    }
//
//    //************************下面的接口为移动端需求，和林长制对接功能   目前可能废弃--------********************//
//
//    @GetMapping(value = "/fireInfoByFireId")
//    @ApiOperation("根据火情id查询火情详情  提供给林长制调用")
//    public DataReturn<FireFeignAlarmsVO> fireInfo(@RequestParam("fireId") String fireId) {
//        FireFeignAlarmsVO fireFeignAlarmsVO = fireAlarmsService.fireInfoByFireId(fireId);
//        return DataReturn.ok(fireFeignAlarmsVO);
//    }
//
//    //任务反馈是否为真实的火情  提供给林长制调用
//    @PostMapping(value = "/isTrueFire")
//    @ApiOperation("任务反馈是否为真实的火情  提供给林长制调用")
//    public DataReturn isTruefire(@RequestBody FireAlarmsUpdateStatusRequest fireAlarmsUpdateStatusRequest) {
//        fireAlarmsService.isTruefire(fireAlarmsUpdateStatusRequest);
//        return DataReturn.ok();
//    }
//
//
//    @ApiOperation(httpMethod = Constant.REQUEST_METHOD_POST, value = "护林员上报火情")
//    @PostMapping(path = "/foresterSave")
//    public DataReturn foresterSave(@RequestBody CommFireAlarmDTO commFireAlarmDTO) {
//        String fireId = fireAlarmsService.foresterSave(commFireAlarmDTO);
//        return DataReturn.ok(fireId);
//    }
//}
